package com.wzh.example.proxy;

import com.wzh.example.proxy.impl.UserServiceImpl;
import org.springframework.util.ClassUtils;

/**
 * @Author zh wang
 * @Create 2025/4/29 8:34
 */
public class Demo {
    public static void main(String[] args) {
        UserService userService = new UserServiceImpl();
        UserServiceProxy userServiceProxy = new UserServiceProxy(userService);
        userServiceProxy.save();

        UserServiceProxy2 userServiceProxy2 = new UserServiceProxy2(userService);
        userServiceProxy2.save();

        System.out.println(ClassUtils.isCglibProxy(userServiceProxy));
        System.out.println(ClassUtils.isCglibProxy(userServiceProxy2));
    }
}
